<?php
/**
 * Created by PhpStorm.
 * User: Auser
 * Date: 2017/1/10
 * Time: 11:13
 */

namespace App\Services;
use App\Services\Algo\CancerTestingAlgo;
class TestingXjbAlgoHelper
{

    /**新健保8套癌症測評接口
     * @param $tid
     * @param $answerStr
     * @param $typeFourExpress
     * @return array
     */
    public function calculate($tid, $answerStr,$typeFourExpress){
        $result = [];
        $instance = new CancerTestingAlgo($tid,$answerStr,$typeFourExpress);
        $result['totalScore'] = $instance->calculate();
        $result['finalAnswerStr'] = $instance->resultToStr();
        return $result;
    }

}